package com.lcc.message_wall.mapper;

import com.lcc.message_wall.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessageMapper {
    //添加留言
    @Insert("insert into message_info (`from`,`to`,`message`) values(#{from},#{to},#{message}) ")
    void insertMessage(MessageInfo messageInfo);
    //获取所有留言
    @Select("select * from message_info where delete_flag=0")
    List<MessageInfo> selectAllMessage();
}
